//
//  PQHistoryBarCodeTableViewCell.m
//  PinQiao
//
//  Created by 老贾 on 16/11/3.
//  Copyright © 2016年 jiayaning. All rights reserved.
//

#import "PQHistoryBarCodeTableViewCell.h"

@interface PQHistoryBarCodeTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *imageview;
@property (weak, nonatomic) IBOutlet UILabel *Typelabel;
@property (weak, nonatomic) IBOutlet UILabel *NeiRongLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@end

@implementation PQHistoryBarCodeTableViewCell

- (void)setHistoryMenu:(PQHistoryMenu *)historyMenu{
    
    if ([historyMenu.type isEqualToString:@"org.iso.QRCode"]) {
        _imageview.image = [UIImage imageWithContentsOfFile:image(@"erweima")];
    }else{
        _imageview.image = [UIImage imageWithContentsOfFile:image(@"tiaoma")];
    }
    NSRange range = NSMakeRange(0, 4);
    NSString *stringUrl = [historyMenu.string substringWithRange:range];
    if ([stringUrl isEqualToString:@"http"]) {
        _Typelabel.text = @"链接";
    }else{
        _Typelabel.text = @"文本";
    }
    _NeiRongLabel.text = historyMenu.string;
    
    _timeLabel.text = historyMenu.time;
}

@end
